﻿@model MvcApplication6.Models.Category_eventModel

@{
    ViewBag.Title = "CategoryEvent";
}

<meta http-equiv="content-language" content="ja"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="../../Content/css/nn-styles.css" rel="stylesheet" type="text/css"/>

@{
   if(@ViewBag.error == "OK")
   {
      <script type="text/javascript">
          alert("Successfull !!! ..... ");
      </script>
   }
   else
   {
       if (ViewBag.error == "NOT")
       {
          <script type="text/javascript">
              alert("Error !!! ..... ");
          </script>
       }
   }
}

<div>
    <a style="margin-left:127px;margin-top:5px;" href="http://aptechpro.vn/"><b>Trang chủ</b></a>  
    <h1 class="ad-title"><center> Category Event </center></h1>

     @using (Html.BeginForm("CategoryEvent", "Admin", FormMethod.Post, new { id = "add_CategoryEvent", name = "add_CategoryEvent", enctype = "multipart/form-data" }))
     {       
        @Html.AntiForgeryToken() <!--Chống giả lập yêu cầu -->
        @Html.ValidationSummary(true) <!-- hiện thị kiểm lỗi phía Server-->
         
        @Html.TextBoxFor(model => model.Id, new { id = "Id", style = "display: none;" })                              
        <p>
            <label for="title"><b>Name: <span style="color:red">*</span></b></label>
            @Html.TextBoxFor(model => model.Name, new { name = "title", type = "text", id = "title", placeholder = "nhập name Category Event... ", style = "width:350px;", maxlength = "200" })
            @Html.ValidationMessageFor(model => model.Name)
        </p>
        <p>
            <label for="title"><b>Content template: </b></label>
            @Html.TextAreaFor(model => model.Content_template, new { name = "title", id = "title", style = "width:350px;", maxlength = "1000" })
            @Html.ValidationMessageFor(model => model.Content_template)
        </p>
        <div class="btn-submit">
        @{
         if (@ViewBag.Button == "Edit")
         {
                <input type="submit" name="Command" class="btn_contact" value="Edit" />
         }
         else
         {
                <input type="submit" name="Command" class="btn_contact" value="Create" />
         }            
        }
        </div>
     }
</div><!-- end.content-->
